package com.tyk.bookstore.back.user.util;

import com.tyk.bookstore.back.system.model.dto.UserInfoDto;
import com.tyk.bookstore.back.system.model.dto.RouteDto;
import com.tyk.bookstore.back.system.model.query.UpdateUserInfoQuery;
import com.tyk.bookstore.back.user.model.query.UpdateBaseInfoQuery;
import com.tyk.bookstore.back.user.model.vo.RouteVo;
import com.tyk.bookstore.back.user.model.vo.UserInfoVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring", implementationName = "UserDetailMapstructCenterImpl")
public interface MapstructCenter {

	@Mapping(source = "title", target = "meta.title")
	@Mapping(source = "icon", target = "meta.icon")
	@Mapping(source = "type", target = "meta.type")
	@Mapping(source = "hidden", target = "meta.hidden")
	@Mapping(source = "keepAlive", target = "meta.keepAlive")
	RouteVo toGetRouteVo(RouteDto dto);

	UserInfoVo toUserInfoVo(UserInfoDto userInfoDto);

    UpdateUserInfoQuery toUpdateUserInfoQuery(UpdateBaseInfoQuery query);
}
